<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf" %>
<script type="text/javascript" src="${ctx}/js/order/order_edit.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}
label[class^="btn btn-default"]{
	margin-top: -4px;
}
</style>
<script type="text/javascript" src="${ctx}/js/jedate/jedate.js"></script>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/order/order_editEntity.shtml">
		<input type="hidden" class="form-control checkacc" value="${order.id}"
			name="orderFormMap.id" id="id">
		<section class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label">客户名称</label>
					<div class="col-sm-9">
						<select  class="form-control" id="client" name="orderFormMap.client_no">
							<c:forEach var="key" items="${client}" >
								<option value="${key.id}" ${key.id==order.client_no?'selected':'' }>${key.name }</option>	
							</c:forEach>
						</select>
						</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">名称</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh"
							 name="orderFormMap.Name" value="${order.Name}"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">模具编号</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" readonly="readonly"
							placeholder="等模具做好后连接" name="orderFormMap.mold_encode" id="workcenter_no" value="${order.mold_encode}" readonly/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">订单数量</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkName"
							placeholder="请输入订单数量" name="orderFormMap.number"  required value="${order.number}">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">定重</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="请输入定重"
							name="orderFormMap.client_weight"  value="${order.client_weight }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">排产重量</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="请输入排产重量" required
							name="orderFormMap.production_weight"  value="${order.production_weight }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">接单日期</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" id="receiving_date" placeholder="请输入接单日期" readonly
							name="orderFormMap.receiving_date"  value="${order.receiving_date }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">排单日期</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" id="production_date" placeholder="请输入排单日期" required readonly
							name="orderFormMap.production_date"  value="${order.production_date }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">采购订单号</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入采购订单号"
							name="orderFormMap.po_no"  value="${order.po_no }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">客户编码</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入客户编码"
							name="orderFormMap.client_encode"  value="${order.client_encode }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">出货日期</label>
					<div class="col-sm-9">
					 <input type="text" class="form-control" placeholder="请输入出货日期" id="shipping_time" required readonly
							name="orderFormMap.shipping_time" value="${order.shipping_time}"/>
					 </div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">定价方式</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入定价方式"
							name="orderFormMap.pricing_method"  value="${order.pricing_method }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">作业号</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入作业号"
							name="orderFormMap.job_number"  value="${order.job_number }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">单价</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入单价" required
							name="orderFormMap.price"  value="${order.price }">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">状态</label>
					<div class="col-sm-9">
					<select  class="form-control" id="client" name="orderFormMap.state">
							<option value="1" ${order.state==1?'selected':''}>已完成</option>
							<option value="2" ${order.state==2?'selected':''}>生产中</option>
							<option value="3" ${order.state==3?'selected':''}>未完成</option>
					</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">业务员</label>
					<div class="col-sm-9">
					<select  class="form-control" id="client" name="orderFormMap.salesman_id">
						<c:forEach var="key" items="${alluser}" >
								<c:if test="${key.position_id==3 }">
									<option value="${key.id }" ${key.id==order.salesman_id?'selected':''} >${key.accountName}</option>
								</c:if>	
						</c:forEach>
					</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">计划员</label>
					<div class="col-sm-9">
					<select  class="form-control" id="client" name="orderFormMap.planner_id">
						<c:forEach var="key" items="${alluser}" >
								<c:if test="${key.position_id==2 }">
									<option value="${key.id }" ${key.id==order.planner_id?'selected':''} >${key.accountName}</option>
								</c:if>	
						</c:forEach>
					</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">完成时间</label>
					<div class="col-sm-9">
					 <input type="text" class="form-control" placeholder="请输入完成时间" id="dateinfo" readonly
							name="orderFormMap.finish_time" value="${order.finish_time}"/>
					 </div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
			<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> 
	</section>
	</form>
<script type="text/javascript">
jeDate({
	dateCell:"#dateinfo",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
jeDate({
	dateCell:"#shipping_time",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
jeDate({
	dateCell:"#receiving_date",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
jeDate({
	dateCell:"#production_date",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
</script>
</body>
</html>